Modularity
Our products are designed with modularity in mind, providing us with the flexibility to add, remove, and modify individual components without having to rewrite the core or other modules. This also enables us to spin off parts of our products as open-source plugins or reusable internal code.
When possible, modules should interact with each other through the use of actions and filters. This allows for seamless communication between different parts of the code, making hooks a powerful tool. It's important to note that each module should have its own independent functionality, rather than relying on hooks for its implementation. This approach helps to ensure the stability and longevity of the code.
However, we do not impose strict barriers between modules. In some cases, it may make more sense to have modules depend on each other instead of relying solely on the mediator. This approach can lead to improved readability and performance, as well as a more practical solution.
By designing our code to be as modular as possible, we can reuse it in future projects.
Open-sourcing our plugins also provides additional benefits, including increased code quality and reduced bugs due to the contributions of the wider development community. It also allows us to give back to the community and contribute to its continued growth by releasing new and innovative projects.